package com.fept.msgcore.msgserver.protocol.model.body;

import com.fept.msgcore.msgserver.protocol.model.base.ProtocolConstants;

/**
 * Created by Srma on 2/9/2017.
 */
public class NopBody extends BaseBody {

    /**
     *
     */
    private static final long serialVersionUID = 4607539443696679228L;

    public NopBody() {
        this.setType(ProtocolConstants.BODY_NOP);
        this.setLength(0);
    }

    /**
     *
     * @param type
     * @return
     */
    public static NopBody getNopOption() {
        NopBody nopBody = new NopBody();
        return nopBody;
    }

    /**
     *
     */
    @Override
    public byte[] pack() {
        byte[] bodyBytes = new byte[0];

        this.setValue(bodyBytes);
        this.setLength(bodyBytes.length);
        return super.pack();
    }

    /**
     *
     */
    @Override
    public void unpack(byte[] data, int offset) {
        super.unpack(data, offset);
    }

}
